package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username    string `gorm:"type:varchar(20);not null;commit:'账号'"`
	Password    string `gorm:"type:varchar(50);not null;commit:'密码'"`
	Tel         string `gorm:"type:char(11);not null;commit:'手机号'"`
	Handerimage string `gorm:"type:varchar(200);not null;commit:'头像'"`
}

type Products struct {
	gorm.Model
	Shopname  string `gorm:"type:varchar(20);not null;commit:'商品名称'"`
	Shopimage string `gorm:"type:varchar(200);not null;commit:'商品图片'"`
	Price     int64  `gorm:"type:int;not null;commit:'价格'"`
	Stock     int64  `gorm:"type:int;not null;commit:'库存'"`
	Userid    int64  `gorm:"type:int;not null;commit:'用户编号'"`
}
